package cn.yza.设计模式.观察者模式.观察者2;

import java.io.File;

/** 收到通知后在日志中记录一条消息
 * @author Honglixi
 * @create 2022-05-17 14:57
 */
public class LogOpenListener implements EventListener{
    private File log;

    public LogOpenListener(File log) {
        this.log = log;
    }

    @Override
    public void update(String eventType, File file) {
        System.out.println("Save to log" + log + ": Someone has performed" + eventType);
    }
}
